#include <iostream>
#include <fstream>
#include <cstdlib>

using namespace std;

const char c[27]={'d','j','k','z','u','x','c','m','l','i','w','b','v','n','o','p','q','a','r','s','g','h','f','t','y','e',' '};

//加密函数 
//参数为 文件输入、输出流
void encryption(ifstream& fin,ofstream& fout);

int main()
{
	ifstream fin;
	ofstream fout;
	fin.open("file1_1.in");   //输入文件file1_1.in
	if(fin.fail())
	{
		cout<<"File open error!(Input)"<<endl;
		exit(1);
	}
	fout.open("file1_1.out");   //输出文件file1_1.out
	{
		cout<<"File open error!(Output)"<<endl;
	}
	
	encryption(fin,fout);
	fin.close();
	fout.close();

	return 0;

}

void encryption(ifstream& fin,ofstream& fout)
{
	char next;
	char ch;
	int i;

	while(fin.get(next))
	{
		if(next>='a' && next<='z')
		{
			i=next-'a'; //明文在字母表中的位置
			ch=c[i];    //对应密文的位置，输出密文
			fout<<ch;
		}			
		else 
			fout<<' ';			
	}
}
 
